export class BaseModel extends saas.Model{

    _name:string;

    async update(id,data){
        return await this.mysql(this._name).where({id:id}).update(data);
    }

    async find(whereOptions){
        return await this.mysql(this._name).where(whereOptions);
    }

    async findOne(id) {
        return await this.mysql(this._name).where({id:id});
    }

    async insert(data) {
        return await this.mysql(this._name).insert(data);
    }

    async del(id) {
        return await this.mysql(this._name).where({id:id}).del();
    }


}